package com.momoda.monitor;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 这里配置打成war包，
 * 创建ServletInitializer.java，继承SpringBootServletInitializer ，覆盖configure()，
 * 把启动类Application注册进去。外部web应用服务器构建Web Application Context的时候，会把启动类添加进去。
 * mvn clean package  -Dmaven.test.skip=true‘
 * https://www.cnblogs.com/ityouknow/p/6834287.html
 */
public class ServletInitializer extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(MonitorApplication.class);
    }


}
